<div class="modal-header">
    <h3 ng-click="cancel()">
        <ot-entity-image entity="config.promotionLevel" link="#/promotionLevel/{{config.promotionLevel.id}}">
            {{config.promotionLevel.name}}
        </ot-entity-image>
        promotions in build
        <a href="#/build/{{config.build.id}}">
            {{config.build.name}}
        </a>
    </h3>
</div>
<div class="modal-body">
    <div class="alert alert-warning" ng-if="promotionRuns.length == 0">
        No promotion.
    </div>
    <table class="table table-condensed table-hover" ng-if="promotionRuns">
        <thead>
        <tr>
            <th>Promoter</th>
            <th>Date</th>
            <th>Description</th>
            <th>&nbsp;</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="promotionRun in promotionRuns">
            <td>
                {{promotionRun.signature.user.name}}
            </td>
            <td>
                {{promotionRun.signature.time | date:'mediumDate' }}
                {{promotionRun.signature.time | date:'shortTime' }}
            </td>
            <td class="ot-description">
                {{promotionRun.description}}
            </td>
            <td>
                <span
                        ng-if="promotionRun._delete"
                        ng-click="deletePromotionRun(promotionRun)"
                        title="Delete this promotion."
                        class="ot-command ot-command-delete"></span>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" type="submit" ng-click="cancel()">OK</button>
</div>